﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace com.tiyma.web.User
{
    public partial class Reg :BasePage
    {
        public string m_return_url = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            m_return_url = Request["ReturnUrl"];

            if (string.IsNullOrEmpty(m_return_url))
            {
                if (Request.UrlReferrer != null)
                {
                    m_return_url = Request.UrlReferrer.ToString();
                    if (string.IsNullOrEmpty(m_return_url))
                        m_return_url = "/default.aspx";
                }
            }
            if (!string.IsNullOrEmpty(m_return_url))
            {
                if ((m_return_url.ToLower().StartsWith("https") || m_return_url.ToLower().StartsWith("ftp")))
                {
                    m_return_url = "/default.aspx";
                }
            }
            if (string.IsNullOrEmpty(m_return_url))
                m_return_url = "/default.aspx";
        }
    }
}
